<?php
	$tel=$_REQUEST['phone'];
	$name=$_REQUEST['name'];
	$sex=$_REQUEST['sex'];
	$data=$_REQUEST['data'];


	$con=mysqli_connect('localhost', 'root', '', 'friday');
	if($con){
		mysqli_set_charset($con,'utf8');
		 $sql1="update accountstate set name='{$name}',sex='{$sex}',birthday='{$data}',telphone='{$tel}'  limit 1";
	   $result1=mysqli_query($con, $sql1);
    	$sql2="select * from accountstate where telphone='{$tel}' limit 1";
		$result2=mysqli_query($con,$sql2);
		$arr=mysqli_fetch_all($result2,MYSQLI_ASSOC);
		$str=json_encode($arr);
		echo $str;


		
	}else {
		echo "链接未遂".mysqli_connect_error();
	}
	
	mysqli_close($con);
	?>